<template>
	<div id="components-layout-demo-top">
		<div class="righcon" :style="{'height':form.Type == 1?'280px':'160px'}">
			<div class="conleft" :style="{'width':form.Type == 1?'58%':'100%'}">
				<div class="conleft1">
					<div class="username">
						{{ form.Name }}（{{form.UserNo}}）
						<a-icon v-if="form.Sex == 2" style="color: #FB6161;" type="woman" />
						<a-icon v-else style="color: #5E95FF;" type="man" />
					</div>
					<div class="other" v-if="!form.IsSuper">
						<div class="c-c-c" v-if="form.Type == 1">
							<span style="margin-right: 10px;">
								<i>班级</i>
								{{ form.ClassName }}
							</span>
							<span style="margin-right: 10px;"><i>年级</i>{{ form.Grade }}</span>
							<span style="margin-right: 10px;">
								<i>学院</i>{{ form.DepartName }}
							</span>
							<span style="margin-right: 0px;cursor: pointer;" @click="openHonestyScore">
								<i>诚信值</i>{{ form.HonestyScore }} >>
							</span>
						</div>
						<div v-else class="c-c-c">
							<span>
								<i>职位</i>
								教师
							</span>
							<span>
								<i>学院</i>
								{{ form.DepartName }}
							</span>
						</div>
					</div>
					<div class="other" v-else>
						<div class="c-c-c">
							<span>
								<i>职位</i>
								超级管理员
							</span>
						</div>
					</div>
				</div>
				<div class="conleft2" v-if="form.Type == 1">
					<banner :bannerData="bannerData" :interval="30000" />
				</div>
			</div>
			<div class="conright" v-if="form.Type == 1">
				<h3>
					我的成绩单
					<span class="btn" v-if="RepordCardShow&&!form.EvaluateInfo.IsHideScore" @click="seeList1('ReportCard')" >
						打印
					</span>
					<!-- <a-button class="more" @click="seeList('UserScoreRecord')">更多 ></a-button> -->
				</h3>
				<div class="center-div">
					<div v-if="!form.EvaluateInfo.IsHideScore" class="bg-chart"
						:class="{'bg-jg':score<=60,'bg-zd':(score>=70&&score<80),'bg-lh':(score>=80&&score<90)}">
						<div class="jt" :class="{'jt-jg':score<=60,'jt-zd':(score>=70&&score<80),'jt-lh':(score>=80&&score<90)}"></div>
						<div class="chart">
							{{ score}}{{form.ScoreName}}
						</div>
					</div>
					<div class="ul" v-if="!form.EvaluateInfo.IsHideScore">
						<h2>您的第二课堂成绩为：</h2>
						<div>
							<p>{{form.ScoreName}}：<em>{{score}}</em></p>
							<p>评定等级：<em style="font-size: 17px;">{{score < UserInfo.AdoptScore?'不合格':'合格'}}</em></p>
						</div>
					</div>
					<div v-if="form.EvaluateInfo.IsHideScore" style="color: #fff;font-weight: bold;font-size: 20px;margin-top: 50px;">
						暂无数据
					</div>
				</div>
			</div>
		</div>
		<div class="flex">
			<div class="content-lf">
				<div class="list-content">
					<h2>学生组织</h2>
					<a-tabs>
						<a-tab-pane key="3" tab="已加入的学生组织">
							<div class="con con2" v-loading="loading1">
								<h3 style="text-align: right;margin-bottom: 5px;height: 30px;">
									<a-button class="join" @click="joinclub" style="position: relative;top: -8px;">全部 ></a-button>
									<a-button class="more" @click="seeList('MoreJoinClub')">更多></a-button>
								</h3>
								<div class="activecon" style="margin-top: -25px;">
									<div class="tr list-style" v-for="(item, m) in ClubList" :key="m" v-if="m < 5">
										<div class="box-pack-center">
											<div class="allowclick box-pack-start title">
												{{ item.Name }}
											</div>
											<div class="flex">
												<div style="width:calc(100% - 140px);" class="box-pack-center">
													<span>类型：</span>{{ item.TypeName }}
													<span>学院：</span>{{ item.DpeartName }}
												</div>
												<div class="user-btn">
													<span class="activity" @click="JoinActivity(item)">活动</span>
													<span class="notice" @click="Notice(item)">公告</span>
													<span class="exit" @click="ExitClub(item)">退出</span>
												</div>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="ClubList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
						<a-tab-pane key="4" tab="我管理的学生组织">
							<div class="con con3" v-loading="loading2">
								<h3 class="flex btn-flex">
									<a-button class="more" @click="seeList('MoreManageClub')">更多></a-button>
								</h3>
								<div class="activecon">
									<div class="tr list-style" v-for="(item, m) in MClubList" :key="m" v-if="m < 5">
										<div class="box-pack-center">
											<div class="allowclick box-pack-start title">
												{{ item.Name }}
											</div>
											<div class="flex">
												<div style="width:calc(100% - 140px);" class="box-pack-center">
													<span>类型：</span>{{ item.TypeName }}
													<span>学院：</span>{{ item.DpeartName }}
												</div>
												<div class="user-btn">
													<span class="member" @click="membermanage(item)">成员</span>
													<span class="applicant" @click="applicant(item)">申请人</span>
													<span class="notice" @click="Notice(item)">公告</span>
												</div>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="MClubList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
					</a-tabs>
				</div>
				<div class="list-content" style="position: relative;">
					<h2>课程大厅<span @click="$router.push(`MoreAllActivity`)">查看所有课程 <img src="../../assets/home/frame.png"/> </span></h2>
					<a-tabs v-model="tabIndex1">
						<a-tab-pane :tab="ActivityTypeList[i].Name" v-for="(item, i) in ActivityTypeList" :key="i">
							<div class="con con1" v-loading="loading0">
								<h3 class="flex btn-flex">
									<div class="statecon">
										<div class="li" @click="stateFun(state.Key, i)"
											:class="{ on: state.Key == ActivityTypeList[i].state }"
											v-for="(state, m) in stateList" :key="m">{{ state.Value }}</div>
									</div>
									<a-button class="more"
										@click="$router.push(`MoreAllActivity?ID=${item.ID}&Name=${item.Name}&progress=${item.state}`)">
										更多>
									</a-button>
								</h3>
								<div class="activecon">
									<div class="tr list-style" v-for="(list, m) in item.data" :key="m">
										<div class="box-pack-center">
											<div class="allowclick box-pack-start title">
												<span style="display: inline-block;margin-right: 10px;color: #0048D2;background: #eee;">{{list.No}}</span>{{ list.Title?list.Title:(list.TypeName+'('+list.TypeItemName+')') }}
											</div>
											<div class="box-pack-center">
												<span>学生组织：</span>{{ list.ClubName || list.ClassName }}
												<span>{{ActivityTypeList[i].state==3?'活动人数':list.IsNeedApply?'报名人数':'是否需要报名'}}：</span>{{ ActivityTypeList[i].state==3?(list.MemberNum+'/'+(list.PeopleNum==-1?'无上限':list.PeopleNum)):list.IsNeedApply?list.ApplyNum:'否' }}
												<span>时间：</span>{{ list.StartTime }} 至 {{list.EndTime}}
												<a-button shape="circle"
													v-show="UserInfo.Type==1&&list.IsNeedApply && ActivityTypeList[i].state==1"
													class="titlemore" @click="AllJoinActivity(list)">
													<a-icon type="plus" />
												</a-button>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="!item.data || item.data.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
					</a-tabs>
				</div>
				<div class="list-content" v-if="UserInfo.Type==1">
					<h2>活动大厅<!-- <span>查看所有活动 <img src="../../assets/home/frame.png"/> </span> --></h2>
					<a-tabs>
						<a-tab-pane key="1" tab="班级活动">
							<div class="con con4">
								<h3 class="flex btn-flex">
									<!-- <div class="statecon">
							<div class="li" @click="getClassActivityList(state.Key)" :class="{ on: state.Key == classprogress }" v-for="(state, m) in stateList" :key="m">{{ state.Value }}</div>
						</div> -->
									<a-button class="more"
										@click="$router.push(`MoreAllActivity?ID=class&Name=班级/组织&progress=${classprogress}`)">
										更多>
									</a-button>
								</h3>
								<div class="activecon">
									<div class="tr list-style" v-for="(item, m) in ClassActivityList" :key="m" v-if="m < 5">
										<div class="box-pack-center">
											<div class="allowclick box-pack-start title" @click="seedetail(item)">
												{{ item.Title || item.TypeItemName }}
											</div>
											<div class="box-pack-center">
												<span>学生组织/班级：</span>{{ item.ClubName || item.ClassName }}
												<!-- <span>{{item.IsNeedApply?'报名人数':'是否需要报名'}}：</span>{{ item.IsNeedApply?item.ApplyNum:'否' }} -->
												<span>成员数：</span>{{ item.MemberNum }}
												<span>活动时间：</span>{{ item.StartTime }} 至 {{ item.EndTime }}
											</div>
										</div>
									</div>
									<div class="nothing" v-if="ClassActivityList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
						<a-tab-pane key="2" tab="我管理的活动">
							<div class="con con4" v-loading="loading4">
								<h3 class="flex btn-flex">
									<div class="statecon">
										<div class="li" @click="getManageActivityList(state.Key)"
											:class="{ on: state.Key == manageprogress }" v-for="(state, m) in stateList"
											:key="m">
											{{ state.Value }}
										</div>
									</div>
									<a-button class="more"
										@click="$router.push(`MoreManageActivity?progress=${manageprogress}`)">
										更多></a-button>
								</h3>
								<div class="activecon">
									<div class="tr list-style" v-for="(item, m) in MActivityList" :key="m" v-if="m < 5">
										<div class="box-pack-center">
											<div class="allowclick box-pack-start title" @click="seedetail(item)">
												{{ item.Title || item.TypeItemName }}
											</div>
											<div class="flex">
												<div class="box-pack-center">
													<span>所属：</span>{{ item.ClubName || item.ClassName }}
													<span>成员数：</span>{{ item.MemberNum }}
													<span>活动时间：</span>{{ item.StartTime }} 至 {{ item.EndTime }}
												</div>
											</div>
											<div class="box-pack-center user-btn user-btn-bg">
												<span class="member" @click="activitymembermanage(item)">成员</span>
												<span class="applicant" @click="ActivityApplyList(item)">申请人</span>
												<span class="signin" @click="UserActivitySign(item)">签到管理</span>
												<span class="award" v-if="item.IsHasPrize" @click="UserPrizeList(item)">获奖信息</span>
												<span class="file" @click="AddFile(item)">附件</span>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="MActivityList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
						<a-tab-pane tab="我参加的活动" key="3" v-if="UserInfo.Type==1">
							<div class="con con3" v-loading="loading3">
								<h3 class="flex btn-flex">
									<div class="statecon">
										<div class="li" @click="getJoinActivityList(state.Key)"
											:class="{ on: state.Key == joinprogress }" v-for="(state, m) in stateList"
											:key="m">
											{{ state.Value }}
										</div>
									</div>
									<a-button class="more"
										@click="$router.push(`MoreJoinActivity?progress=${joinprogress}`)">更多>
									</a-button>
								</h3>
								<div class="activecon">
									<div class="tr list-style" v-for="(item, m) in MJActivityList" :key="m"
										v-if="m < 5">
										<div class="allowclick box-pack-start title" @click="seedetail(item)">
											{{ item.Title || item.TypeItemName }}
										</div>
										<div class="flex">
											<div class="box-pack-center">
												<span>所属：</span>{{ item.ClubName || item.ClassName }}
												<span>成员数：</span>{{ item.MemberNum }}
												<span>活动时间：</span>{{ item.StartTime }} 至 {{ item.EndTime }}
											</div>
										</div>
										<div class="box-pack-center user-btn user-btn-bg">
											<span class="file" @click="AddFile(item)">附件</span>
											<span class="signin" @click="UserActivitySignRecord(item)">签到记录</span>
										</div>
									</div>
									<div class="nothing" v-if="MJActivityList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
					</a-tabs>
				</div>
				<div class="list-content" v-if="UserInfo.Type==2">
					<h2>活动审批大厅<span @click="seeList('ActivityFlow')">查看所有审批 <img src="../../assets/home/frame.png"/> </span></h2>
					<a-tabs>
						<a-tab-pane tab="积分发放（完结审批）" key="0">
							<div class="con con2" v-loading="loading6">
								<h3 class="flex btn-flex">
									<div class="statecon">
										<div class="li" @click="endTlowTypeFun(state.Key)"
											:class="{ on: state.Key == endFlowstate }"
											v-for="(state, m) in flowTypeList" :key="m">
											{{ state.Value }}
										</div>
									</div>
									<a-button class="more" @click="seeList('EndActivityFlow')">更多></a-button>
								</h3>
								<div class="activecon" v-show="endFlowstate == 1">
									<div class="tr list-style" v-for="(item, m) in EndActivityFlowTypeList" :key="m">
										<div class="allowclick box-pack-center title"
											 @click="seeFlowList(item, 'ActivityExam', 1)">
											{{ item.ActivityTitle || item.TypeItemName }}
										</div>
										<div class="flex">
											<div class="box-pack-center" style="width:calc(100% - 140px);">
												<span>编号：</span>{{ item.No|| item.ActivityNo || '暂无' }}
												<span>申请人：</span>{{ item.AddUserName }}
											</div>
											<div class="user-btn">
												<span class="examine" @click="seeFlowList(item, 'ActivityExam', 1)">审批</span>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="EndActivityFlowTypeList.length == 0">暂无数据</div>
								</div>
								<div class="activecon" v-show="endFlowstate == 2">
									<div class="tr list-style" v-for="(item, m) in AlreadyEndActivityFlowTypeList"
										:key="m">
										<div class="allowclick box-pack-center title"
											@click="seeFlowList(item, 'ActivityExam', 2)">
											{{ item.ActivityTitle || item.TypeItemName }}
										</div>
										<div class="flex">
											<div style="width:90%;" class="box-pack-center">
												<span>编号：</span>{{ item.No|| item.ActivityNo ||'暂无' }}
												<span>申请人：</span>{{ item.AddUserName }}
											</div>
											<div style="width:10%;" class="box-pack-center">
												<a-tag :color="item.IsAdopt ? 'blue' : 'red'">
													{{ item.IsAdopt ? '通过' : '驳回' }}
												</a-tag>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="AlreadyEndActivityFlowTypeList.length == 0">暂无数据</div>
								</div>
							</div>
						</a-tab-pane>
						<a-tab-pane :tab="item.Name" v-for="(item, i) in ActivityFlowTypeList" :key="i+1">
							<div class="con con2" v-loading="loading5">
								<h3 class="flex btn-flex">
									<div class="statecon">
										<div class="li" @click="flowTypeFun(state.Key, i)"
											:class="{ on: state.Key == item.state }" v-for="(state, m) in flowTypeList"
											:key="m">{{ state.Value }}</div>
									</div>
								</h3>
								<div class="activecon" v-show="item.state == 1">
									<div class="tr list-style" v-for="(item, m) in item.data" :key="m">
										<div class="box-pack-center">
											<div class="allowclick box-pack-center title"
												@click="seeFlowList(item, 'ActivityExam', 3)">
												{{ item.ActivityTitle || item.TypeItemName }}
											</div>
											<div class="flex">
												<div class="box-pack-center" style="width:calc(100% - 140px);">
													<span>编号：</span>{{ item.No || item.ActivityNo || '暂无' }}
													<span>申请人：</span>{{ item.AddUserName }}
												</div>
												<div class="user-btn">
													<!-- <span class="member" @click="seeFlowList(item, 'ActivityFlowUpdate', 1)">修改</span> -->
													<!-- <span class="examine" @click="activityApplyExamFun(item)">审批</span> -->
													<span class="examine" @click="seeFlowList(item, 'ActivityExam', 3)">审批</span>
												</div>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="!item.data || item.data.length == 0">暂无数据</div>
								</div>
								<div class="activecon" v-show="item.state == 2">
									<!-- <div class="th">
										<div style="width:100px;">编号</div>
										<div style="width:calc(70% - 100px);">活动</div>
										<div style="width:20%;">申请人</div>
										<div style="width:15%;">审批</div>
									</div> -->
									<div class="tr list-style" v-for="(item, m) in item.alreadydata" :key="m">
										<div class="box-pack-center">
											<div class="allowclick box-pack-center title"
												@click="seeFlowList(item, 'ActivityExam', 2)">
												{{ item.ActivityTitle || item.TypeItemName }}
											</div>
											<div class="flex">
												<div class="box-pack-center" style="width: 85%;">
													<span>编号：</span>{{ item.No || item.ActivityNo || '暂无' }}
													<span>申请人：</span>{{ item.AddUserName }}
												</div>
												<div style="width:15%;" class="box-pack-center">
													<a-tag :color="item.IsAdopt ? 'blue' : 'red'">
														{{ item.IsAdopt ? '本节点通过' : '本节点驳回' }}
													</a-tag>
												</div>
											</div>
										</div>
									</div>
									<div class="nothing" v-if="!item.alreadydata || item.alreadydata.length == 0">暂无数据
									</div>
								</div>
							</div>
						</a-tab-pane>
						
					</a-tabs>
				</div>
			</div>
			<div class="content-ri">
				<div class="news-list" :style="{'min-height':form.Type !== 1?'90vh':'30vh'}">
					<img src="../../assets/home/tzgg.png" />
					<div class="news-title">
						<div style="width: 100%;">通知公告 <span @click="seeList('UserNewList')" style="font-size: 12px;cursor: pointer;float: right;color: #3F81FF;">更多></span></div>
					</div>
					<div class="news-content news-content1" style="cursor: pointer;" v-for="(item, index) in newsList" :key="index" @click="$router.push(`UserNewsDetail?ID=${item.ID}`)">
						<div style="width: 100%;">{{ item.Title }}</div>
					</div>
					<!-- <div class="news-more" v-if="prizesList.length > 0">查看全部</div> -->
					<div class="nothing" :style="{'margin-top':form.Type !== 1?'20vh':'0'}" v-if="newsList.length == 0">暂无数据</div>
					<!-- <div class="news-more" v-if="newsList.length > 0" @click="seeList('UserNewList')">查看全部</div> -->
				</div>
				<div class="news-list" v-if="form.Type == 1">
					<img src="../../assets/home/gzll.png" />
					<div class="news-title flex">
						<div>学期</div>
						<div>职务全称</div>
						<!-- <div>分值</div> -->
					</div>
					<div class="news-content flex" v-for="(item, i) in UserPostList" :key="i">
						<div>{{ item.SemesterName }}</div>
						<div>{{ item.Title }}</div>
						<!-- <div>{{ item.Score }}</div> -->
					</div>
					<!-- <div class="news-more" v-if="prizesList.length > 0">查看全部</div> -->
					<div class="nothing" v-if="UserPostList.length == 0">暂无数据</div>
				</div>
				<div class="news-list" v-if="form.Type == 1">
					<img src="../../assets/home/hjjl.png" />
					<div class="news-title flex">
						<div>活动名称</div>
						<div>奖项</div>
						<!-- <div>积分</div> -->
					</div>
					<div class="news-content flex" v-for="(item, i) in prizesList.filter((m,n) => n<2)" :key="i">
						<div>{{ item.ActivityName }}</div>
						<div>{{ item.PrizeTitle }}-{{ item.ActivityTypePrizeTitle?' | '+item.ActivityTypePrizeTitle:'' }}</div>
						<!-- <div>{{ item.PrizeScore }}</div> -->
					</div>
					<div class="nothing" v-if="prizesList.length == 0">暂无数据</div>
					<div class="news-more" v-if="prizesList.length > 0" @click="seeList('UserPrize')">查看全部</div>
				</div>
			</div>
		</div>
		<addActivity v-if="showModal" @closeFun="closeFun"></addActivity>
		<detailActivity v-if="detailshowModal" :text="text" @closeFun="closeFun"></detailActivity>
		<applyActivity :text="text" :time="time" v-show="applyshowModal" @closeFun="closeFun"></applyActivity>
		<RepordCard v-if="RepordCardPorpShow" :ActivityTypeListByParentID="ActivityTypeListByParentID"
			@closeFun="closeFun" :UserPostList="UserPostList" :prizesList="prizesList"></RepordCard>
		<activityApplyExam :text="text" v-if="activityApplyExamShow" @closeFun="closeFun"></activityApplyExam>
		<honestyscore v-show="honestyscoreStatus" @closeFun="closeFun" />
	</div>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	import moment from 'moment';
	import {
		UserGetListActivityMemberPrize,
		GetJoinClubList,
		GetUserManagClubList,
		GetManageActivityPageList,
		DoGetTeacherExamPageList,
		DoGetTeacherAlreadyExamPageList,
		UserDoGetNewsPageList,
		DoGetSportsList,
		GetJoinActivityPageList,
		UserDoGetScoreList,
		DoOutClub,
		GetActivityPageList,
		GetPrizePageListCenter,
		UserCenterDoGetUserPostList,
		UserGetActivityTypeListByParentIDCommon,
		UserGetListActivityIndex,
		GetActivityFlowTypeListRoleActivityFlow,
		GetExamPageListActivityFlow,
		GetAlreadyExamPageListActivityFlow,
		GetEndExamPageList,
		GetEndAlreadyExamPageList,
		UserActivityDoGetClassPageList,
		DoCenterGetCreditWarningNoticeList,
		UserCenterDoGetSumScoreList,
		CenterDoGetActivityTypeScorList
	} from '@/api/follow';
	import addActivity from './addActivity.vue';
	import detailActivity from './detailActivity.vue';
	import applyActivity from '@/components/ApplyActivity';
	import activityApplyExam from '@/components/activityApplyExam';
	import UserActivityCon1 from '../UserActivityCon/index1.vue';
	import UserActivityCon2 from '../UserActivityCon/index2.vue';
	import UserActivityCon3 from '../UserActivityCon/index3.vue';
	import UserActivityCon4 from '../UserActivityCon/index4.vue';
	import RepordCard from '@/views/ReportCard/index.vue';
	import honestyscore from "@/views/HonestyScore/index.vue"

	import Cache from '@/utils/cache';
	export default {
		components: {
			addActivity,
			detailActivity,
			applyActivity,
			UserActivityCon1,
			UserActivityCon2,
			UserActivityCon3,
			UserActivityCon4,
			RepordCard,
			activityApplyExam,
			honestyscore
		},
		data() {
			return {
				honestyscoreStatus:false,
				tabIndex1: 0,
				bannerData: [],
				form: Cache.get('myInfo'),
				loading0: false,
				loading1: false,
				loading2: false,
				loading3: false,
				loading4: false,
				loading5: false,
				loading6: false,
				name: 'www.ele.me',
				ClubList: [],
				MClubList: [],
				UserPostList:[],
				MActivityList: [{Title:'测试',ClubName:'俱乐部名称',MemberNum:8,StartTime:'2022-10-01',EndTime:'2022-10-03'}],
				MJActivityList: [],
				historysports: [],
				ClassActivityList: [],
				avatar: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=757545797,2214471709&fm=11&gp=0.jpg',
				showModal: false,
				newsList: [],
				nowdate: moment().format('YYYY-MM-DD'),
				requestUrl: this.global.requestUrl,
				detailshowModal: false,
				applyshowModal: false,
				time: '',
				text: {},
				list: [],
				UserInfo: Cache.get('myInfo'),
				ActivityTypeList: [{
						ID: '',
						Name: ''
					},
					{
						ID: '',
						Name: ''
					},
					{
						ID: '',
						Name: ''
					},
					{
						ID: '',
						Name: ''
					}
				],
				rotate: '0deg',
				stateList: this.global.stateList,
				flowTypeList: this.global.flowTypeList,
				ActivityFlowTypeList: [],
				activityApplyExamShow: false,
				joinprogress: 1,
				manageprogress: 1,
				classprogress: 1,
				RepordCardShow: false,
				RepordCardPorpShow: false,
				ActivityTypeListByParentID: [],
				endFlowstate: 1,
				AlreadyEndActivityFlowTypeList: [],
				EndActivityFlowTypeList: [],
				scoreList: [],
				prizesList:[],
				scoreFEN:'',
				score:''
			};
		},
		created() {
			this.getActivityCenter();
			this.getNoticeList();
			this.getJoinClubList();
			this.getManageClubList();
			if (this.UserInfo.Type == 1) {
				this.getJoinActivityList(1);
				this.getManageActivityList(1);
				this.getClassActivityList(3)
				this.getActivityMemberPrizeList()
				
			} else {
				if (this.UserInfo.IsAdmin) {
					// this.adminList();
					// this._GetEndAlreadyExamPageList()
					// this._GetEndExamPageList()
					if(this.UserInfo.functionUrlList.indexOf('/Manage/ActivityFlow/DoGetAlreadyExamPageList')!=-1){
					this.adminList();
					}
					if(this.UserInfo.functionUrlList.indexOf('/Manage/ActivityFlow/DoGetEndAlreadyExamPageList')!=-1){
						this._GetEndAlreadyExamPageList()
					}
					if(this.UserInfo.functionUrlList.indexOf('/Manage/ActivityFlow/DoGetEndExamPageList')!=-1){
						this._GetEndExamPageList()
					}
				}
			}
			this.getOtherList()
		},
		mounted() {
			setTimeout(() => {
				if (this.form.Type == 1) {
					this.getScoreList()
				}
			}, 1000)
		},
		computed: {
		
			// score: function() {
			// 	let scoreList = this.scoreList;
			// 	let scoreAll = 0;
			// 	for (let i = 0; i < scoreList.length; i++) {
			// 		if (scoreList[i].TotalScore) {
			// 			scoreAll = scoreAll + scoreList[i].TotalScore;
			// 		}
			// 	}
			// 	// Cache.set('score',scoreAll)
			// 	this.$store.commit('score', scoreAll);
			// 	return scoreAll;
			// }
		},
		methods: {
			async getOtherList() {
				let res = await UserCenterDoGetUserPostList({})
				this.UserPostList = res.data.data
				let res1 = await CenterDoGetActivityTypeScorList({})
				this.bannerData = res1.data.data
			},
			async getActivityMemberPrizeList() {
				let res = await UserGetListActivityMemberPrize({UserNo:this.UserInfo.UserNo})
				if(res.data.code === 0){
					this.prizesList = res.data.data
				}
			},
			endTlowTypeFun(key) {
				this.endFlowstate = key
			},
			flowTypeFun(key, i) {
				this.ActivityFlowTypeList[i].state = key;
			},
			async getActivityCenter() {
				this.loading0 = true;
				let res = await UserGetActivityTypeListByParentIDCommon({
					parentID: ''
				});
				let list = res.data.data;
				this.ActivityTypeListByParentID = JSON.parse(JSON.stringify(res.data.data));
				if (this.UserInfo.Type == 1) {
					this.RepordCardShow = true;
				}
				for (let i = 0, len = list.length; i < len; i++) {
					let data = {};
					data.state = 1;
					data.top = 5;
					data.isClass = false;
					data.typeID = list[i].ID;
					let res1 = await UserGetListActivityIndex(data);
					list[i] = {
						...list[i],
						data: res1.data.data,
						state: 1
					};
				}
				this.ActivityTypeList = res.data.data;
				// this.ActivityTypeList[0].data=[{ClubName:'ceshi',Title:'测试标题',MemberNum:5},{ClubName:'ceshi22',Title:'测试标题',MemberNum:5},{ClubName:'ceshi333',Title:'测试标题',MemberNum:5}]
				this.loading0 = false;
			},
			async getScoreList() {
				// let res8 = await UserDoGetScoreList();
				// this.scoreList = res8.data.data;
				// console.log('合并')
				// 此处将履历积分加上
				for(let i=0;i<this.UserPostList.length;i++){
					this.scoreList.push({
						TotalScore:this.UserPostList[i].Score
					})
				}
				let res9=await UserCenterDoGetSumScoreList();
				// console.log(this.UserPostList)
				// this.scoreList.concat(this.UserPostList);
				 // console.log(this.scoreList);
				let scoreList = this.scoreList;
				let scoreAll = 0;
				// for (let i = 0; i < scoreList.length; i++) {
				// 	if (scoreList[i].Score) {
				// 		scoreAll = scoreAll + scoreList[i].Score;
				// 	}
				// }
				console.log(res9.data.total)
				this.score=Number(res9.data.total).toFixed(2) 
				 scoreAll=res9.data.total;
				this.rotate = (scoreAll / 40) * 180 > 180 ? '180deg' : (scoreAll / 40) * 180 + 'deg';
			},
			async getNoticeList() {
				let res5 = await UserDoGetNewsPageList({
					pageIndex: 1,
					pageSize: 5
				});
				this.newsList = res5.data.data;
				// this.newsList = [{Title:'这是一则通告内容这是一则通告内容这是一则通告内容这是这是一则通告内容这是一则通告内容这是一则通告内容这是......',AddTime:'2022-12-01'}]
			},
			async getJoinClubList() {
				this.loading1 = true;
				let res = await GetJoinClubList({
					pageIndex: 1,
					pageSize: 5
				});
				this.ClubList = res.data.data;
				this.loading1 = false;
			},
			async getManageClubList() {
				this.loading2 = true;
				let res1 = await GetUserManagClubList({
					pageIndex: 1,
					pageSize: 5
				});
				this.MClubList = res1.data.data;
				this.loading2 = false;
			},
			async getJoinActivityList(progress) {
				this.loading3 = true;
				this.joinprogress = progress;
				let res7 = await GetJoinActivityPageList({
					pageIndex: 1,
					pageSize: 4,
					progress: progress
				});
				this.MJActivityList = res7.data.data;
				this.loading3 = false;
			},
			async getManageActivityList(progress) {
				this.loading4 = true;
				this.manageprogress = progress;
				let res2 = await GetManageActivityPageList({
					pageIndex: 1,
					pageSize: 4,
					progress: progress
				});
				this.MActivityList = res2.data.data;
				this.loading4 = false;
			},
			async getClassActivityList(progress) {
				this.classprogress = progress
				let res = await UserActivityDoGetClassPageList({
					pageIndex: 1,
					pageSize: 5,
					progress: progress
				})
				this.ClassActivityList = res.data.data
			},
			async adminList() {
				this.loading5 = true;
				let res = await GetActivityFlowTypeListRoleActivityFlow();
				let list = res.data.data;
				for (let i = 0, len = list.length; i < len; i++) {
					let data = {};
					data.flowTypeID = list[i].ID;
					data.pageIndex = 1;
					data.pageSize = 4;
					let res1 = await GetExamPageListActivityFlow(data);
					let res2 = await GetAlreadyExamPageListActivityFlow(data);
					list[i] = {
						...list[i],
						data: res1.data.data,
						alreadydata: res2.data.data,
						state: 1
					};
				}
				this.ActivityFlowTypeList = list;
				this.loading5 = false;
			},
			async _GetEndExamPageList() {
				let res = await GetEndExamPageList();
				if (res.data.code == 0) {
					this.EndActivityFlowTypeList = res.data.data
				} else {
					this.EndActivityFlowTypeList = []
				}
			},
			async _GetEndAlreadyExamPageList() {
				let res = await GetEndAlreadyExamPageList();
				//this.AlreadyEndActivityFlowTypeList = res.data.data
			},
			async stateFun(key, i) {
				let data = {};
				data.state = key;
				data.top = 5;
				data.typeID = this.ActivityTypeList[i].ID;
				this.ActivityTypeList[i].state = key;
				data.isClass = false;
				let res = await UserGetListActivityIndex(data);
				this.ActivityTypeList[i].data = res.data.data;
			},
			activityApplyExamFun(item) {
				this.text = item;
				this.activityApplyExamShow = true;
			},
			seeFlowList(text, name, type) {
				this.$router.push({
					name: name,
					query: {
						ID: text.ID,
						ActivityID: text.ActivityID,
						followId: text.ID,
						type: type
					}
				});
			},
			seedetail(t,path,source,followId) {
				this.text = t;
				this.text.source=source;
				this.text.followId=followId
				this.detailshowModal = !this.detailshowModal;
			},
			AllJoinActivity(t) {
				this.text = t;
				this.time = new Date();
				this.text.time = new Date();
				this.applyshowModal = !this.applyshowModal;
			},
			seeList1() {
				this.RepordCardPorpShow = true
			},

			seeList(name) {
				this.$router.push({
					name: name
				});
			},
			UserActivitySign(text) {
				this.$router.push({
					name: 'UserActivitySign',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo,
						State:text.State,
						manageprogress:this.manageprogress
					}
				});
			},
			UserPrizeList(text) {
				this.$router.push({
					name: 'UserActivityMemberPrize',
					query: {
						activityID: text.ID,
						TypeID: text.TypeID,
						State:text.State
					}
				});
			},
			Notice(text) {
				this.$router.push({
					name: 'NoticeJoin',
					query: {
						Name: text.Name,
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo
					}
				});
			},
			AddFile(text) {
				this.$router.push({
					name: 'Enclosure',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo,
						State:text.State
					}
				});
			},
			UserActivitySignRecord(text) {
				this.$router.push({
					name: 'ActivitySignRecord',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo
					}
				});
			},
			ActivityApplyList(text) {
				this.$router.push({
					name: 'UserActivityApplyList',
					query: {
						ID: text.ID,
						State:text.State
					}
				});
			},
			JoinActivity(text) {
				this.$router.push({
					name: 'UserJoinActivity',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo
					}
				});
			},
			activitymembermanage(text) {
				this.$router.push({
					name: 'ActivityMembermanage',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo,
						ClubID: text.ClubID,
						TypeID: text.TypeID,
						State:text.State
					}
				});
			},
			membermanage(text) {
				this.$router.push({
					name: 'Membermanage',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChairmanNo
					}
				});
			},
			applicant(text) {
				this.$router.push({
					name: 'ApplyList',
					query: {
						ID: text.ID
					}
				});
			},
			activitymanage(text) {
				this.$router.push({
					name: 'UserActivitymanage',
					query: {
						ID: text.ID,
						State: text.IsAgreeApplyActivity
					}
				});
			},
			closeFun(index) {
				this.showModal = false;
				this.detailshowModal = false;
				this.applyshowModal = false;
				this.activityApplyExamShow = false;
				this.RepordCardPorpShow = false
				this.honestyscoreStatus=false
				if (index == 1) {
					this.showModal != this.showModal;
					this.adminList()
					this._GetEndExamPageList()
					this._GetEndAlreadyExamPageList()
				}
			},
			joinclub() {
				this.$router.push({
					name: 'ChooseClub'
				});
			},
			DoAddActivity() {
				this.showModal = !this.showModal;
			},
			ExitClub(text) {
				let that = this;
				this.$confirm({
					title: '提示',
					content: `您确定退出该学生组织吗？`,
					okText: '确认',
					cancelText: '取消',
					async onOk() {
						let data = {};
						data.id = text.ID;
						let res = await DoOutClub(data);
						if (res.data.code == 0) {
							that.getJoinClubList();
							that.$message.success(res.data.msg);
						} else {
							that.$message.error(res.data.msg);
						}
					}
				});
			},
			openHonestyScore(e){
				this.honestyscoreStatus=true
			}
			
		}
	};
</script>

<style lang="less" scoped>
	/deep/.ant-tabs-tab-active {
		color: #0048D2 !important;
		font-weight: bold !important;
	}

	/deep/.ant-tabs-ink-bar {
		background-color: #3F81FF !important;
		height: 3px !important;
	}

	/deep/.ant-tabs-nav-container {
		font-size: 14px !important;
		margin-bottom: 0 !important;
	}

	/deep/.ant-tabs-tab {
		padding: 22px 16px !important;
	}

	.con {
		margin-top: 10px;
	}


	.content-lf {
		width: 70%;
		margin-right: 20px;
	}

	.content-ri {
		width: 30%;

		.news-list {
			margin-bottom: 20px;
			border-radius: 10px;
			background: #fff;
			text-align: left;
			img {
				width: 100%;
			}

			.news-title {
				font-size: 16px !important;
				font-weight: bold !important;
				padding: 10px;
				border-bottom: 1px solid #D9D9D9;
				color: #000;
			}

			.news-content {
				padding:5px 10px;
				font-size: 12px;
				div{
					height: 35px;
					line-height: 35px;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
			}
			.news-content1{
				div{
					width: 100%;
					padding-left: 10px;
					position: relative;
					height: 35px;
					line-height: 35px;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					&::before{
						content: '●';
						position: absolute;
						top: 0;
						left: 0;
						color: #3F81FF;
					}
				}
			}
			.news-more {
				background: #eee;
				color: #3F81FF;
				text-align: center;
				padding: 5px 0;
				border-radius: 0 0 10px 10px;
				box-shadow: 0 0 0 #eee;
				cursor: pointer;
			}

			.flex {
				// margin-bottom: 15px;

				div {
					color: #000;

					&:nth-child(1) {
						width: 55%;
					}

					&:nth-child(2) {
						width: 45%;
					}
				}
			}
		}
	}

	.list-content {
		background: #fff;
		border-radius: 10px;
		padding: 3px 0;
		margin-bottom: 20px !important;

		h2 {
			font-size: 22px;
			color: #000;
			line-height: 50px;
			font-weight: bold;
			margin-bottom: 0;
			margin-top: 5px;
			margin: 5px 20px 0 20px;
			span {
				float: right;
				font-weight: normal;
				font-size: 14px;
				cursor: pointer;
				img{
					vertical-align: sub;
				}
			}
		}
		
	}

	.titlemore {
		width: 20px;
		height: 20px;
		min-width: 20px;
		line-height: 20px;
		margin-left: 10px;
		font-size: 18px;
		.anticon {
			margin-right: 0;
			line-height: 20px;
		}
	}

	.btn-flex {
		width: 100%;
		position: relative;

		.more {
			position: absolute;
			right: 0;
			top: 2px;
		}
	}

	h3 {
		color: #383649;
		font-size: 16px;
		font-weight: 600;
		margin-bottom: 5px;
		line-height: 39px;

		img {
			width: 39px;
			height: 39px;
		}

		.join {
			height: 27px;
			color: #fff;
			background: #4577eb;
			border: none;
			padding: 0 12px;
			border-radius: 18px;
			font-size: 12px;
			margin-right: 10px;
		}

		.more {
			border: none;
			float: right;
			margin-right: 20px;
			height: 26px;
			background: #fff;
			border: 1px solid #4577eb;
			// box-shadow: 0px 0px 2px #4577eb;
			border-radius: 18px;
			font-size: 12px;
			color: #4577eb;
			padding: 0px 12px;
			display: block;
			.anticon {
				margin-left: -6px;
				line-height: 30px;
			}
		}
	}

	.newcon {
		width: 50%;
		padding: 10px;
		float: left;

		ul {
			height: 260px;
			background: #ffffff;
			box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.28);
			opacity: 1;
			border-radius: 16px;
			padding: 10px;

			li {
				list-style: none;
				height: 50px;
				line-height: 50px;
				border-bottom: 1px solid #e2e2e2;
				color: #39527b;
				font-size: 14px;
				display: flex;
				padding: 0 4px;

				&:nth-child(even) {
					background-color: #f8fcff;
				}

				.newslititle {
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					flex: 1;
				}

				.time {
					width: 104px;
					text-align: right;
					font-size: 12px;
					color: rgba(57, 82, 123, 0.62);
				}
			}
		}
	}

	.statecon {
		height: 36px;
		display: flex;
		line-height: 36px;
		text-align: center;
		margin-bottom: 3px;
		font-size: 12px;
		margin-left: 20px;
		.li {
			flex: 1;
			height: 36px;
			line-height: 36px;
			margin-right: 15px;
			text-align: center;
			border-radius: 5px;
			padding: 0 32px;
			cursor: pointer;
			color: #000;
			font-weight: normal;

			&:hover {
				background: rgba(222, 222, 222, 0.63);
				color: rgba(6, 8, 12, 0.6);
			}

			&.on {
				background: #3F81FF;
				color: #fff;
			}
		}
	}

	.flowtitle {
		font-weight: bold;
		font-size: 16px;
		color: #39527b;
		margin: 20px 5px 0;
	}

	.activecon {
		padding-bottom: 15px;
	}
	.nothing{
		height:478px !important;
		background-position:center 160px !important;
	}
	.activecon .th {
		display: flex;
		height: 44px;
		line-height: 44px;
		text-align: center;
	}

	.activecon .th>div {
		font-weight: bold;
		font-size: 14px;
		color: #39527b;
	}

	.activecon .tr {
		padding: 20px;
		font-size: 14px;
		color: #39527b;
		&:nth-child(2n) {
			background-color: rgb(245,248,254);
		}
	}

	.activecon .tr .time {
		display: block;
		word-break: break-all !important;
		font-size: 12px;
		line-height: 18px;
		margin-top: 4px;
	}

	.activecon .tr>div {
		// overflow: hidden;
		// text-overflow: ellipsis;
		// white-space: nowrap;
		// display:-moz-box;
		// -moz-box-pack:center;
		// -moz-box-align:center;
		// display:-webkit-box;
		// -webkit-box-pack:center;
		// -webkit-box-align:center;
		// display:box;
		// box-pack:center;
		// box-align:center;
		line-height: 20px;
		padding: 0 2px;
	}

	.activecon .tr>div:first-child {}

	.mainleft .con2 h3 {
		height: 34px;
	}

	.mainleft .con h3 {
		height: 34px;
		font-size: 16px;
		font-weight: bold;
		color: #39527b;
		margin-bottom: 5px;
	}

	.state {
		// flex:1;
		width: 100px;
		font-size: 12px;
		font-weight: normal;
		line-height: 30px;
		display: flex;
		font-weight: 400;
		color: rgba(6, 8, 12, 0.6);

		/deep/.ant-select-selection {
			width: 100%;
			height: 26px;
			line-height: 26px;
			margin: 0px 4px;
			text-align: center;
			box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.14);
			border-radius: 10px;
			color: #4577eb;
			line-height: 26px;
			border: none;

			.anticon {
				color: #4577eb;
			}
		}

		/deep/.ant-select-selection__rendered {
			line-height: 26px;
		}

		.li {
			width: 70px;
			height: 26px;
			line-height: 26px;
			margin: 2px 4px;
			text-align: center;
			box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.14);
			border-radius: 10px;

			&.on {
				background: #4577eb;
				color: #fff;
			}
		}
	}

	.righcon {
		height: 280px;
		display: flex;
		.conleft {
			min-width: 58%;
		}

		.conleft2 {
			margin-top: 15px;
		}

		.conleft1 {
			background-image: url(../../assets/home/grxx.png);
			background-repeat: no-repeat;
			background-position: left center;
			background-color: #fff;
			box-sizing: 100%;
			border-radius: 10px;
			padding: 20px 10px 22px 300px;
			height: 142px;

			.username {
				font-size: 20px;
				line-height: 27px;
				color: #150826;
			}

			.other {
				font-size: 12px;
				line-height: 24px;
				color: #6D6D6D;
				margin-top: 12px;
				background-color: #E6EFFF;
				border-radius: 10px;
				margin-right: 10px;
				padding: 18px 10px;
				span {
					margin-right: 15px;

					i {
						font-style: normal;
						color: #296FF8;
						padding-right: 3px;
					}
				}
			}

			.updateinfo {
				padding: 6px 10px;
				border-radius: 6px;
				font-size: 15px;
				margin: 0 0 0 25px;
				font-family: Microsoft YaHei;
				font-weight: bold;
				background: #4577eb;
				color: #fff;
				cursor: pointer;
			}
		}

		.conright {
			width: 42%;
			border-radius: 12px;
			padding: 15px 30px 15px 40px;
			height: 252px;
			margin-left: 15px;
			background: url(../../assets/home/wdcjd.png) no-repeat 100% 100%;
			position: relative;
			h3 {
				color: #fff;
				font-size: 20px;
				font-weight: bold;
				padding-left: 68px;
				background: url(../../assets/home/title-cjd.png) no-repeat top left;
				background-size: 52px auto;
				line-height: 47px;
				.btn {
					float: right;
					line-height: 1.8;
					font-weight: normal;
					font-size: 12px;
					cursor: pointer;
					border-radius: 15px;
					padding: 2px 15px 2px 35px;
					position: relative;
					top: 5px;
					right: -10px;
					background-image: url(../../assets/home/print.png);
					background-repeat: no-repeat;
					background-position: 15px center;
					background-color: rgba(0, 0, 0, .15);
				}
			}

			.chart {
				position: absolute;
				color: #000;
				font-size: 16px;
				text-align: center;
				width: 102px;
				height: 102px;
				line-height: 102px;
				font-weight: bold;
				font-size: 22px;
				text-align: center !important;
				border-radius: 50%;
				background: #fff;
				left: 50%;
				margin-left: -51px;
				top: 50%;
				margin-top: -51px;
				transform: rotate(-45deg);
			}
			.jt{
				position: absolute;
				left: 14px;
				top: 13px;
				transform: rotate(-45deg);
				width:0;
				height:0;
				border: 10px solid;
				border-color: transparent transparent #3F81FF transparent;
			}
			.jt-jg{
				left: 14px;
				top: 98px;
				border-color: transparent #3F81FF transparent transparent;
			}
			.jt-zd{
				// left: 20px;
				// top: 23px;
				// border-color: transparent transparent #3F81FF transparent;
			}
			.jt-lh{
				left: 99px;
				top: 14px;
				border-color: transparent transparent transparent #3F81FF;
			}
			.bg-chart {
				width: 150px;
				height: 150px;
				border-radius: 50%;
				border: 9px solid;
				transform: rotate(45deg);
				border-color: #3F81FF;
				position: relative;
			}
			.bg-jg {
				border-left-color: rgba(255, 255, 255, .6);
				border-top-color: rgba(255, 255, 255, .6);
				border-right-color: rgba(255, 255, 255, .6);
			}
			.bg-zd {
				border-top-color: rgba(255, 255, 255, .6);
				border-right-color: rgba(255, 255, 255, .6);
			}

			.bg-lh {
				border-top-color: rgba(255, 255, 255, .6);
			}
			.center-div{
				text-align: center;
				div{
					text-align: left;
					display: inline-block;
				}
			}
			.ul {
				float: right;
				width: calc(~'100% - 260px');
				min-width: 225px;
				max-width: 260px;
				height: 150px;
				padding: 30px 0 30px 40px;
				background: rgba(255, 255, 255, .82);
				border-radius: 26px;
				position: relative;
				top: 5px;
				h2{
					color: rgba(0, 72, 210, 1);
					font-size: 18px;
					font-weight: bold;
				}
				div {
					color: #000;
					font-size: 15px;
					p{
						margin-bottom: 10px;
					}
					em{
						font-style: normal;
						font-weight: bold;
					}
				}
			}

			i {
				display: inline-block;
				width: 26px;
				height: 12px;
				border-radius: 5px;
				margin-right: 13px;
			}
		}

	}
</style>
